#ifndef YASAIGRAPHICSVIEW_H
#define YASAIGRAPHICSVIEW_H

#include <QGraphicsView>
#include <QMenu>
#include <QContextMenuEvent>
#include <QWidget>
#include <QEvent>
#include <QTimer>
#include <QMimeData>
#include <QDropEvent>
#include <QUrl>
#include <QMouseEvent>
#include <QFileInfo>

class YasaiGraphicsView : public QGraphicsView
{
    Q_OBJECT

public:
    YasaiGraphicsView(QWidget * parent = 0);
    YasaiGraphicsView(QGraphicsScene * scene, QWidget * parent = 0);
    virtual ~YasaiGraphicsView();

    void setHideCursor(bool hide);
    int  getZoomAdjustment() const;

signals:
    void activateFullScreen();
    void openDroppedFile(const QFileInfo &fileInfo, const QString &place);
    void changed();

private slots:
    void updateCursor();

private:
    static const int HIDETIME = 1;
    int msUntilHideCursor;
    QTimer *mTimer;

    virtual void dragEnterEvent(QDragEnterEvent *event);
    virtual void dragMoveEvent(QDragMoveEvent *event);
    virtual void dropEvent(QDropEvent* event);
    virtual void contextMenuEvent(QContextMenuEvent *event);
    virtual bool eventFilter(QObject *obj, QEvent *event);
    virtual void mouseMoveEvent(QMouseEvent *event);
    virtual void mouseDoubleClickEvent(QMouseEvent *);
    virtual void wheelEvent(QWheelEvent *event);

    int mZoomAdjustment;
};

#endif // YASAIGRAPHICSVIEW_H
